/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package colordrips;

import javax.swing.JOptionPane;

/**
 *
 * @author SimaoItalo
 */
public class HomeScreen extends javax.swing.JFrame {

    /**
     * Creates new form HomeScreen
     */
    
    public HomeScreen() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        btIniciarJogo = new javax.swing.JButton();
        btRanking = new javax.swing.JButton();
        lbBackGround = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("ColorDrips");
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setMinimumSize(new java.awt.Dimension(628, 496));
        setResizable(false);
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        btIniciarJogo.setFont(new java.awt.Font("Architects Daughter", 0, 12)); // NOI18N
        btIniciarJogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/iniciar.png"))); // NOI18N
        btIniciarJogo.setToolTipText("Iniciar Jogo");
        btIniciarJogo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btIniciarJogoActionPerformed(evt);
            }
        });
        getContentPane().add(btIniciarJogo, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 140, 180, -1));

        btRanking.setFont(new java.awt.Font("Architects Daughter", 0, 12)); // NOI18N
        btRanking.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/rank.png"))); // NOI18N
        btRanking.setToolTipText("Ranking");
        getContentPane().add(btRanking, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 190, 180, -1));

        lbBackGround.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/bg3.png"))); // NOI18N
        getContentPane().add(lbBackGround, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, 500));

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btIniciarJogoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btIniciarJogoActionPerformed
        String name = JOptionPane.showInputDialog(this, "Olá jogador, qual o seu nome ? (:", "Início", 3);
        PlayingField field = new PlayingField(name);
        field.setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_btIniciarJogoActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(HomeScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(HomeScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(HomeScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(HomeScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new HomeScreen().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btIniciarJogo;
    private javax.swing.JButton btRanking;
    private javax.swing.JLabel lbBackGround;
    // End of variables declaration//GEN-END:variables
}
